<template>
  <div class="tabbar">
    <router-link to="/home" class="tab-item" active-class="active">
      <i class="fas fa-home tab-icon"></i>
      <span>首页</span>
    </router-link>
    <router-link to="/store" class="tab-item" active-class="active">
      <i class="fas fa-store tab-icon"></i>
      <span>商店</span>
    </router-link>
    <router-link to="/video" class="tab-item" active-class="active">
      <i class="fas fa-play-circle tab-icon"></i>
      <span>视频</span>
    </router-link>
    <router-link to="/cart" class="tab-item" active-class="active">
      <i class="fas fa-shopping-cart tab-icon"></i>
      <span>购物车</span>
    </router-link>
    <router-link to="/profile" class="tab-item" active-class="active">
      <i class="fas fa-user tab-icon"></i>
      <span>我的</span>
    </router-link>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
  name: 'TabBar'
});
</script>

<style scoped>
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background-color: white;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
  height: 60px;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #8e8e93;
  text-decoration: none;
  font-size: 12px;
}

.tab-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.tab-item.active {
  color: #3490dc;
}
</style> 